Bill identification method, device, electronic device and computer-readable storage medium

ABSTRACT

The disclosure provides a bill identification method, device, electronic device and a computer-readable storage medium. The method includes: obtaining an image of a bill to be identified; using a pre-trained area identification model to identify a final payment area of the bill in the image; using a pre-trained character identification model to identify the final payment amount in the final payment area. By applying the solution provided by the present disclosure, it is possible to realize automatic identification of the payment amount on the bill, and the efficiency of bill processing is improved.

BACKGROUND Technical Field

The present disclosure relates to the field of artificial intelligencetechnology, and in particular related to a bill identification method,device, electronic device, and a computer-readable storage medium.

Description of Related Art

With the continuous development of economy and continuous improvement ofpeople's consumption level, in order to protect people's consumptionrights, invoices now stand for powerful protection for consumers andeffective receipt for reimbursement. Therefore, financial staff need todeal with a large number of invoices every day, and how to automaticallyidentify the payment amount on the invoices is very important to thefinance staff.

SUMMARY

A purpose of the present disclosure is to provide a bill identificationmethod, device, electronic device, and a computer-readable storagemedium so as to realize automatic identification of the payment amounton invoices.

To achieve the above purpose, the present disclosure provides a billidentification method, which includes:

Obtaining an image of the bill to be identified;

Using a pre-trained area identification model to identify the finalpayment area of the bill in the image;

Adopting a pre-trained character identification model to identify thefinal payment amount in the final payment area.

Optionally, the method further includes:

After identifying the final payment area of the bill in the image,segmenting the final payment area;

Outputting a segmented picture of the final payment area and the finalpayment amount for comparison and display.

Optionally, the step of outputting the segmented picture of the finalpayment area and the final payment amount for comparison and displayincludes:

Outputting the segmented picture of the final payment area and the finalpayment amount, and displaying the segmented picture above the finalpayment amount.

Optionally, the step of outputting the segmented picture of the finalpayment area and the final payment amount for comparison and displayincludes:

Outputting the segmented picture of the final payment area and the finalpayment amount, and displaying the segmented picture on the left side ofthe final payment amount.

Optionally, if the final payment area cannot be identified and/or thefinal payment amount in the final payment area cannot be identified, themethod further includes:

Adopting the area identification model to identify an expense summaryarea of the bill in the image;

Adopting the character identification model to identify charactercontent in the expense summary area;

Calculating the final payment amount based on the character content ofthe expense summary area according to a preset rule base.

Optionally, the method further includes:

Determining a sub-area to perform display in the expense summary areaaccording to the character content in the expense summary area, andsegmenting the sub-area;

Outputting the final payment amount and the segmented picture of thesub-area for comparison and display.

Optionally, if the sub-area to perform display in the expense summaryarea cannot be determined, the method further includes:

Segmenting the entire expense summary area;

Outputting the final payment amount and the segmented picture of theexpense summary area for comparison and display.

Optionally, the step of calculating the final payment amount based onthe character content of the expense summary area according to thepreset rule base includes:

Determining an expense type included in the expense summary area and thecorresponding amounts through the character content of the expensesummary area;

Determining the rule corresponding to the included expense type from thepreset rule base, and using the determined rules and the amountcorresponding to the expense type to calculate the final payment amount.

Optionally, the expense type includes one or more of original price,service fee, tip, discount, deduction, tax, currency, exchange rate,unit price and quantity, freight and fuel cost.

To achieve the above purpose, the present disclosure further provides abill identification device, the device includes:

An obtaining module, configured to obtain an image of a bill to beidentified;

A first identification module, configured to use a pre-trained areaidentification model to identify a final payment area of the bill in theimage;

A second identification module, configured to use a pre-trainedcharacter identification model to identify a final payment amount in thefinal payment area.

Optionally, the device further includes:

A segmenting module, configured to segment the final payment area afteridentifying the final payment area of the bill in the image;

A first display module, configured to output a segmented picture of thefinal payment area and the final payment amount for comparison anddisplay.

Optionally, the step of outputting, by the first display module, thesegmented picture of the final payment area and the final payment amountfor comparison and display includes:

Outputting the segmented picture of the final payment area and the finalpayment amount, and displaying the segmented picture above the finalpayment amount.

Optionally, the step of outputting, by the first display module, thesegmented picture of the final payment area and the final payment amountfor comparison and display includes:

Outputting the segmented picture of the final payment area and the finalpayment amount, and displaying the segmented picture on the left side ofthe final payment amount.

Optionally, the device further includes a calculating module; wherein,if the final payment area cannot be identified and/or the final paymentamount in the final payment area cannot be identified,

The first identification module is further configured to use the areaidentification model to identity an expense summary area of the bill inthe image;

The second identification module is further configured to use thecharacter identification model to identify character content in theexpense summary area;

The calculating module is configured to calculate the final paymentamount based on the character content of the expense summary areaaccording to a preset rule base.

Optionally, the device further includes:

A determining module, configured to determine a sub-area to performdisplay in the expense summary area according to the character contentin the expense summary area, and segment the sub-area by using asegmenting module;

A second display module, further configured to output the final paymentamount and the segmented picture of the sub-area for comparison anddisplay.

Optionally, if the sub-area to perform display in the expense summaryarea cannot be determined,

The determining module is further configured to perform segmentingprocessing on the entire expense summary area by using a segmentingmodule;

The second display module is further configured to output the finalpayment amount and a segmented picture of the expense summary area forcomparison and display.

Optionally, the calculating module includes:

A determining sub-module, configured to determine the expense typeincluded in the expense summary area and the corresponding amounts basedon the character content of the expense summary area;

A calculating sub-module, configured to determine a rule correspondingto an included expense type from a preset rule base, and calculate thefinal payment amount by using the determined rule and an amountcorresponding to the expense type.

Optionally, the expense type includes one or more of original price,service fee, tip, discount, deduction, tax, currency, exchange rate,unit price and quantity, freight and fuel cost.

To achieve the above purpose, the present disclosure further provides anelectronic device including a processor, a communication interface, amemory, and a communication bus, wherein the processor, thecommunication interface, and the memory complete communication with eachother through the communication bus;

A memory, configured to store computer programs;

A processor, configured to implement the steps of the billidentification method described in any of the above embodiments whenexecuting a computer program stored in the memory.

To achieve the above purpose, the present disclosure also provides acomputer-readable storage medium, characterized in that a computerprogram is stored in the computer-readable storage medium, and the stepsof the bill identification method described in any of the aboveembodiments are implemented when the computer program is executed by theprocessor.

Compared with the related art, the present disclosure uses an areaidentification model to identify the image of the bill to be identifiedwhen performing bill identification, the final payment area isidentified, and then a character identification model is used toidentify the final payment amount in the final payment area, therebyrealizing automatic identification and display of the payment amount onthe invoice, thus improving the efficiency of bill processing.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic flowchart of a bill identification methodaccording to an embodiment of the present disclosure.

FIG. 2A to FIG. 2B are specific examples of output results afteridentification of a bill provided by an embodiment of the presentdisclosure.

FIG. 3A to FIG. 3H are specific examples of invoices provided by anembodiment of the present disclosure.

FIG. 4 is a schematic structural view of a bill identification deviceaccording to an embodiment of the present disclosure.

FIG. 5 is a schematic structural view of an electronic device accordingto an embodiment of the present disclosure.

DESCRIPTION OF THE EMBODIMENTS

In the following, a bill identification method, device, electronicdevice and a computer-readable storage medium provided by the presentdisclosure are described in detail with reference to the drawings andspecific embodiments. The advantages and features of the disclosure willbe more comprehensible based on the claims and the followingdescription.

In order to solve the problems in the related art, embodiments of thepresent disclosure provide a bill identification method, device,electronic device, and a computer-readable storage medium.

It should be noted that the bill identification method in the embodimentof the present disclosure can be applied to the bill identificationdevice in the embodiment of the present disclosure, and the billidentification device can be configured on an electronic device, whereinthe electronic device may be a personal computer, a mobile terminal, orthe like, and the mobile terminal may be a hardware device such as amobile phone or a tablet computer with various operating systems.

FIG. 1 is a schematic flowchart of a bill identification methodaccording to an embodiment of the present disclosure. Please refer toFIG. 1, a bill identification method may include the following steps:

Step S101, obtaining an image of a bill to be identified.

The bills described in the present disclosure can be invoices, checks,tax bills, receipts, shopping lists, receipts for food and beverage,insurance policies, reimbursement orders, courier orders, itineraries,tickets and other documents containing payment amounts.

Step S102, using a pre-trained area identification model to identify thefinal payment area of the bill in the image.

The final payment area of the bill can be understood as the area wherethe final payment amount of the bill is shown. For example, the finalpayment area in the value-added tax invoice is the “total price and tax”area; the final payment area of the train ticket is the display area ofthe fare; the final payment area of the fixed invoice is the areashowing the invoice amount; and the area showing the payment method inthe shopping receipt preferentially serves as the final payment area.Payment methods include, for example, Alipay, payment by credit card,payment by WeChat, online payment, UnionPay, etc. As the shoppingreceipt shown in FIG. 3C, the area where “Alipay: 27.10” is shown is thefinal payment area.

The bill image is input into the area identification model, and the areaidentification model can identify the final payment area in the bill,and can also mark the identified final payment area, and segment thefinal payment area, that is, to extract the final payment area (from theimage of the bill), thereby obtaining a segmented picture of the finalpayment area.

Step S103, using a pre-trained character identification model toidentify the final payment amount in the final payment area.

After the final payment area is identified, the bill image marked withthe final payment area may be input into the character identificationmodel, or the segmented picture of the final payment area may bedirectly input into the character identification model, and the finalpayment amount in the final payment area can be identified through thecharacter identification model.

In actual applications, the segmented picture of the final payment areaand the final payment amount can also be output for comparison anddisplay. After identifying the final payment area and the final paymentamount, the segmented picture of the final payment area and the finalpayment area are input and both of them are displayed for comparison, sothat it is convenient for users to check and verify whether theidentification result is correct.

Specifically, the method of outputting the segmented picture of thefinal payment area and the final payment amount for comparison anddisplay may be performed for vertical comparison or horizontalcomparison, for example, by displaying the segmented picture above thefinal payment amount, or displaying the segmented picture on the leftside of the final payment amount. FIG. 2A and FIG. 2B are schematicviews of output results after identification of a bill. As shown in FIG.2A, a segmented picture 211 is displayed above the final payment amount212, and as shown in FIG. 2B, a segmented picture 221 is displayed onleft side of the final payment amount 222.

Further, in actual application, if the final payment area cannot beidentified in step S102, and/or, the final payment amount in the finalpayment area cannot be identified in step S103, for instance, the finalpayment area or the final payment amount is torn, stained or the printis vague and cannot be identified, the method of the present disclosuremay further include: using the area identification model to identify anexpense summary area of the bill in the image; using the characteridentification model to identify the character content in the expensesummary area; and then calculating the final payment amount through thecharacter content in the expense summary area according to the presetrule base.

Then, according to the character content in the expense summary area, asub-area to perform display in the expense summary area may bedetermined, and the sub-area is segmented, that is, the sub-area isextracted (from the image of the bill); the final payment amount andsegmented picture of the sub-area are output for comparison and display.

The expense summary area of the bill can be understood as: an areashowing multiple expense types. For the expense summary area ofdifferent bills, please refer to the areas marked with rectangular boxin the bills shown in FIG. 3B to FIG. 3H. Specifically, the type ofexpenses includes but is not limited to: original price, service charge,tip, discount, deduction, tax, currency, exchange rate, unit price andquantity, freight, fuel cost, etc.

Specifically, calculating the final payment amount based on thecharacter content in the expense summary area according to the presetrule base may include: determining the expense type included in theexpense summary area and the corresponding amount through the charactercontent in the expense summary area; determining the rules correspondingto the included expense type from the preset rule base, and using thedetermined rules and the amount corresponding to the expense type tocalculate the final payment amount. It can be understood that each rulein the rule base can be determined according to the relationship betweenvarious types of expenses and the final payment amount.

For example, if the type of expense included in the expense summary areais the original price of the product and discount, the rule forcalculating the final payment amount should be the original price of theproduct minus the discount. Also, if the type of expense included in theexpense summary area is the original price of the product, discount andshipping charge, the rule for calculating the final payment amountshould be the original price of product multiplied by (1−discount) plusshipping charge.

After calculating the final payment amount, the sub-area to performdisplay in the expense summary area is determined. The sub-area toperform display can be understood as the area showing the amount that isthe same as the calculated final payment amount in the expense summaryarea.

In actual application, if it is not possible to determine the sub-areathat needs to perform display in the expense summary area, the methodmay further include: segmenting the entire expense summary area, thatis, to extract the expense summary area (from the image of the bill);and outputting the final payment amount and the segmented picture of theexpense summary area for comparison and display.

The following describes the method of the present disclosure withreference to specific examples of some bills.

As shown in FIG. 3A, the value-added tax invoice can be identified witha financial-character amount area 311 indicating “total price and tax”by the area identification model as the final payment amount and thesegmented area. If the financial-character amount area 311 is notclearly displayed and cannot be identified, for example, thefinancial-character amount area 311 is partially torn, stained or theprint is vague and cannot be identified, a normal-character amount area312 may be selected as the segmented area.

As shown in FIG. 3B, the shopping receipt is identified with a“receivable amount” area 321 as the final payment area by the areaidentification model and the area is segmented. If the area cannot beidentified, for example, the area or the part showing the final paymentamount 152.30 is torn, stained, or the print is vague and cannot beidentified, then the expense summary area 322 is identified. Accordingto the rules and analysis, the final payment amount should be the amountcorresponding to “total amount after discount of unit price”, andtherefore “total amount after discount of unit price” and the area 323corresponding to the amount thereof are segmented and displayed.

As shown in FIG. 3C, the shopping receipt shows that the payment wasmade by Alipay, and therefore the area identification model identifiesthat the area 331 showing “Alipay: 27.10” is the final payment area andthe area is segmented. If the area cannot be identified, for example,the area or the part showing the final payment amount 27.10 is torn,stained or the print is vague and cannot be identified, then the expensesummary area 332 is identified. According to the rules, it is determinedthat the total amount part 333 should be the final payment amount, andtherefore the area is segmented and displayed.

As shown in FIG. 3D, there are two total areas on the bill, which are“total16.18” and “total18.18” respectively. According to the rules, thetotal area 341 at the lower part is preset as the final payment area,which is segmented and displayed. If the area cannot be identified, forexample, the area or the part showing the final payment amount 18.18 istorn, stained, or the print is vague and cannot be identified, then theexpense summary area 342 is identified, and it is identified that thetotal at the upper part is 16.18, gratuity is 2, thus calculating thatthe final payment amount is 18.18, and the sub-area 343 that needs toperform display in the expense summary area shown in the picture issegmented and displayed for comparison.

In the take-out bill shown in FIG. 3E, the take-out bill is a bitspecial. The receivable amount displayed on the bill is 0 because it hasbeen paid online, and therefore the expense summary area 352 can beidentified, and it is identified that the commodity amount is 42.1 andthe discount amount is 22.0, thus calculating that the final paymentamount should be 20.1, and the expense summary area 352 is segmented anddisplayed.

Regarding the bill shown in FIG. 3F, since the amount of money printedin area 361 in the picture is not aligned with the item on the left, theentire area 361 is considered as the final payment area and segmentedand displayed for comparison.

In the shopping receipt shown in FIG. 3G, the area 371 showing “total$39.60” is the final payment area. If the area cannot be identified, forexample, the area or the part showing the final payment amount $39.60 istorn, stained, or the print is vague and cannot be identified, then theexpense summary area 372 is identified, wherein subtotal is $38.64,estimated tax is $0.96, thus calculating that the final payment amountis $39.60, and then the expense summary area 372 is segmented andcompared with the final payment amount and displayed.

In the bill shown in FIG. 3H, the area 381 showing “total $89.25” is thefinal payment area. If the area cannot be identified, for example, thearea or the part showing the final payment amount $89.25 is torn,stained or the print is vague and cannot be identified, then the expensesummary area 382 is identified, wherein sub-total is $119.00, discountis 25%, and the final payment amount is calculated to be $89.25according to the rules. Then the expense summary area 382 is segmentedand compared with the final payment amount and displayed.

The following briefly introduces the training process of the areaidentification model and the character identification model.

The area identification model can be obtained through the followingprocess: labeling each bill image sample in the bill image sample set tolabel the final payment area and/or expense summary area in each billimage sample; and training the neural network through the labeled billimage sample set to obtain the area identification model. When labelingthe final payment area and/or expense summary area, it is also possibleto label whether this area is the final payment area or the expensesummary area.

The character identification model can be obtained through the followingprocess: the final payment area and/or the expense summary area labeledduring the training process of the area identification model are labeledto mark the characters in each area; the neural network is trainedthrough each of the labeled areas to obtain the character identificationmodel.

Certainly, the training set for the character identification model mayalso be different from the training set for the area identificationmodel, which is not limited in the present disclosure.

In summary, compared with the related art, the present disclosure usesan area identification model to identify the image of the bill to beidentified when identifying a bill, thereby identifying the finalpayment area, and then uses a character identification model to identifythe final payment amount in the final payment area, thereby realizingthe automatic identification and display of the payment amount on thebill, and thus improving the efficiency of bill processing.

Corresponding to the above-mentioned embodiment of the billidentification method, the present disclosure provides a billidentification device. Referring to FIG. 4, the device may include:

An obtaining module 201, configured to obtain an image of a bill to beidentified;

A first identification module 202, configured to use a pre-trained areaidentification model to identify a final payment area of the bill in theimage;

A second identification module 203, configured to use a pre-trainedcharacter identification model to identify a final payment amount in thefinal payment area.

Optionally, the device may further include:

A segmenting module, configured to segment the final payment area afteridentifying the final payment area of the bill in the image;

A first display module, configured to output a segmented picture of thefinal payment area and the final payment amount for comparison anddisplay.

Optionally, the first display module is specifically configured to:

Output a segmented picture of the final payment area and the finalpayment amount, and display the segmented picture above the finalpayment amount.

Optionally, the first display module is specifically configured to:

Output a segmented picture of the final payment area and the finalpayment amount, and display the segmented picture on the left side ofthe final payment amount.

Optionally, if the final payment area and/or the final payment amount inthe final payment area cannot be identified, the device may furtherinclude a calculating module; wherein,

The first identification module 202 is further configured to use thearea identification model to identify an expense summary area of thebill in the image;

The second identification module 203 is further configured to use thecharacter identification model to identify character content in theexpense summary area;

The calculating module is configured to calculate the final paymentamount based on the character content of the expense summary areaaccording to a preset rule base.

Optionally, the device may further include:

A determining module, configured to determine a sub-area to performdisplay in the expense summary area according to the character contentin the expense summary area, and segment the sub-area by using asegmenting module;

The second display module, further configured to output the finalpayment amount and the segmented picture of the sub-area for comparisonand display.

Optionally, if the sub-area to perform display in the expense summaryarea cannot be determined,

The determining module may further use a segmenting module forsegmenting the entire expense summary area;

The second display module may be further configured to output the finalpayment amount and a segmented picture of the expense summary area forcomparison and display.

Optionally, the calculating module may include:

A determining sub-module, configured to determine the type of expenseincluded in the expense summary area and the corresponding amount basedon the character content of the expense summary area;

A calculating sub-module, configured to determine a rule correspondingto an included expense type from a preset rule base, and calculate thefinal payment amount by using the determined rule and an amountcorresponding to the expense type.

Optionally, the type of expense may include: original price, servicefee, tip, discount, deduction, tax, currency, exchange rate, unit priceand quantity, freight, fuel cost.

The present disclosure also provides an electronic device, as shown inFIG. 5, including a processor 301, a communication interface 302, amemory 303, and a communication bus 304, wherein the processor 301, thecommunication interface 302, and the memory 303 complete communicationwith each other through the communication bus 304,

A memory 303, configured to store a computer program;

The processor 301, configured to implement the following steps whenexecuting a program stored in the memory 303:

Obtaining an image of the bill to be identified;

Using a pre-trained area identification model to identify the finalpayment area of the bill in the image;

Using a pre-trained character identification model to identify the finalpayment amount in the final payment area.

For the specific implementation of each step of the method and relatedexplanations, please refer to the embodiment of the method shown in FIG.1 described above, and no repetition will be incorporated herein.

In addition, other implementation methods of the bill identificationmethod implemented by the processor 301 executing the program stored inthe memory 303 are the same as the implementation methods mentioned inthe foregoing embodiment of the method, and thus related details are notrepeated here.

The communication bus of the electronic device mentioned above may be abus conforming to Peripheral Component Interconnect (PCI) or a bus withExtended Industry Standard Architecture (EISA) and so on. Thecommunication bus can be divided into address bus, data bus, controlbus, etc. For ease of representation, the bus is only indicated by athick line in the figure, but it does not mean that there is only onebus or one type of bus.

The communication interface is used for communication between the aboveelectronic device and other devices.

The memory may include Random Access Memory (RAM), and may also includeNon-Volatile Memory (NVM), such as at least one disk memory. Optionally,the memory may be at least one storage device located far from theabove-mentioned processor.

The above processor may be a general-purpose processor, including acentral processing unit (CPU), a network processor (NP), etc.; and mayalso be a digital signal processor (DSP), a dedicated applicationspecific integrated circuit (ASIC), a field programmable gate array(FPGA), or other programmable logic devices, discrete gate or transistorlogic devices, discrete hardware components.

The present disclosure also provides a computer-readable storage medium.A computer program is stored in the computer-readable storage medium,and the steps of the above-mentioned bill identification method areimplemented when the computer program is executed by the processor.

It should be noted that each embodiment in this specification isdescribed in a related manner, and the same and similar parts of variousembodiments can be referred from each other. Each embodiment focuses onthe differences from other embodiments. In particular, for theembodiments of the device, the electronic device, and thecomputer-readable storage medium, since they are basically similar tothe embodiment of the method, the description of them is relativelysimple. For the related parts, please refer to part of the embodiment ofthe method for details.

In this disclosure, relational terms such as first and second are usedonly to distinguish one entity or operation from another entity oroperation, and do not necessarily require or imply the existence of anyactual relationship or sequence between these entities or operations.Moreover, the terms “including”, “comprising”, or any other variationthereof are intended to encompass non-exclusive inclusion, such that aprocess, method, object, or device that includes a series of elementsincludes not only those elements but also those that are not explicitlylisted, or further includes elements inherent to such process, method,object, or device. With no further limitations, the elements defined bythe sentence “comprising a . . . ” do not exclude the existence of otheridentical elements in the process, method, object or device includingthe elements.

The above description is only a description of the preferred embodimentof the present disclosure, and does not limit the scope of the presentdisclosure. Any changes and modifications made by those skilled in theart in accordance with the above disclosure shall fall within the scopeof the claims.

1. A bill identification method, the method comprises: obtaining animage of a bill to be identified; using a pre-trained areaidentification model to identify a final payment area of the bill in theimage; using a pre-trained character identification model to identify afinal payment amount in the final payment area, wherein if the finalpayment area cannot be identified and/or the final payment amount in thefinal payment area cannot be identified, the method further comprises:using the pre-trained area identification model to identify an expensesummary area of the bill in the image; using the pre-trained characteridentification model to identify character content in the expensesummary area; calculating the final payment amount based on thecharacter content of the expense summary area according to a preset rulebase.
 2. The bill identification method according to claim 1, whereinthe method further comprises: after identifying the final payment areaof the bill in the image, segmenting the final payment area; outputtinga segmented picture of the final payment area and the final paymentamount for comparison and display.
 3. The bill identification methodaccording to claim 2, wherein the step of outputting the segmentedpicture of the final payment area and the final payment amount forcomparison and display comprises: outputting the segmented picture ofthe final payment area and the final payment amount, and displaying thesegmented picture above the final payment amount.
 4. The billidentification method according to claim 2, wherein the step ofoutputting the segmented picture of the final payment area and the finalpayment amount for comparison and display comprises: outputting thesegmented picture of the final payment area and the final paymentamount, and displaying the segmented picture on the left side of thefinal payment amount.
 5. (canceled)
 6. The bill identification methodaccording to claim 1, wherein the method further comprises: determininga sub-area to perform display in the expense summary area according tothe character content in the expense summary area, and segmenting thesub-area; outputting the final payment amount and the segmented pictureof the sub-area for comparison and display.
 7. The bill identificationmethod according to claim 6, wherein if the sub-area to perform displayin the expense summary area cannot be determined, the method furthercomprises: segmenting the entire expense summary area; outputting thefinal payment amount and the segmented picture of the expense summaryarea for comparison and display.
 8. The bill identification methodaccording to claim 1, wherein the step of calculating the final paymentamount based on the character content of the expense summary areaaccording to the preset rule base comprises: determining an expense typeincluded in the expense summary area and a corresponding amount throughthe character content of the expense summary area; determining a rulecorresponding to the included expense type from the preset rule base,and using the determined rule and the amount corresponding to theexpense type to calculate the final payment amount.
 9. The billidentification method according to claim 8, wherein the expense typecomprises one or more of original price, service fee, tip, discount,deduction, tax, currency, exchange rate, unit price and quantity,freight and fuel cost.
 10. A bill identification device, the devicecomprises: an obtaining module, configured to obtain an image of a billto be identified; a first identification module, configured to use apre-trained area identification model to identify a final payment areaof the bill in the image; a second identification module, configured touse a pre-trained character identification model to identify a finalpayment amount in the final payment area; and a calculating module;wherein, if the final payment area cannot be identified and/or the finalpayment amount in the final payment area cannot be identified, the firstidentification module is further configured to use the pre-trained areaidentification model to identity an expense summary area of the bill inthe image, the second identification module is further configured to usethe pre-trained character identification model to identify charactercontent in the expense summary area, the calculating module isconfigured to calculate the final payment amount based on the charactercontent of the expense summary area according to a preset rule base. 11.The bill identification device according to claim 10, wherein the devicefurther comprises: a segmenting module, configured to segment the finalpayment area after identifying the final payment area of the bill in theimage; a first display module, configured to output a segmented pictureof the final payment area and the final payment amount for comparisonand display.
 12. The bill identification device according to claim 11,wherein the step of outputting, by the first display module, thesegmented picture of the final payment area and the final payment amountfor comparison and display comprises: outputting the segmented pictureof the final payment area and the final payment amount, and displayingthe segmented picture above the final payment amount.
 13. The billidentification device according to claim 11, wherein the step ofoutputting, by the first display module, the segmented picture of thefinal payment area and the final payment amount for comparison anddisplay comprises: outputting the segmented picture of the final paymentarea and the final payment amount, and displaying the segmented pictureon the left side of the final payment amount.
 14. (canceled)
 15. Thebill identification device according to claim 10, wherein the devicefurther comprises: a determining module, configured to determine asub-area to perform display in the expense summary area according to thecharacter content in the expense summary area, and segment the sub-areaby using a segmenting module; a second display module, furtherconfigured to output the final payment amount and a segmented picture ofthe sub-area for comparison and display.
 16. The bill identificationdevice according to claim 15, wherein if the sub-area to perform displayin the expense summary area cannot be determined, the determining moduleis further configured to perform segmenting processing on the entireexpense summary area by using a segmenting module; the second displaymodule is further configured to output the final payment amount and asegmented picture of the expense summary area for comparison anddisplay.
 17. The bill identification device according to claim 10,wherein the calculating module comprises: a determining sub-module,configured to determine an expense type included in the expense summaryarea and a corresponding amount through the character content of theexpense summary area; a calculating sub-module, configured to determinea rule corresponding to an included expense type from the preset rulebase, and calculate the final payment amount by using the determinedrule and the amount corresponding to the expense type.
 18. The billidentification device according to claim 17, wherein the expense typecomprises one or more of original price, service fee, tip, discount,deduction, tax, currency, exchange rate, unit price and quantity,freight and fuel cost.
 19. An electronic device, comprising a processor,a communication interface, a memory, and a communication bus, whereinthe processor, the communication interface, and the memory completecommunication with each other through the communication bus; the memoryis configured to store a computer program; the processor is configuredto implement the following steps when executing the computer programstored in the memory: obtaining an image of a bill to be identified;using a pre-trained area identification model to identify a finalpayment area of the bill in the image; using a pre-trained characteridentification model to identify a final payment amount in the finalpayment area, if the final payment area cannot be identified and/or thefinal payment amount in the final payment area cannot be identified,wherein the method further comprises: using the pre-trained areaidentification model to identify an expense summary area of the bill inthe image; using the pre-trained character identification model toidentify character content in the expense summary area; calculating thefinal payment amount based on the character content of the expensesummary area according to a preset rule base.
 20. A non-transitorycomputer-readable storage medium, a computer program is stored in thecomputer-readable storage medium, and when the computer program isexecuted by a processor, steps of the bill identification method claimedin claim 1 are executed.